package au.edu.qut.bpm.genbinder.genetic.evaluation.costmodels;

import java.util.List;

import au.edu.qut.bpm.genbinder.genetic.evaluation.LogEvaluator;
import au.edu.qut.bpm.genbinder.models.ConcreteEventLog;

public class SimpleCostModel extends LogEvaluator {
	// This is just a simple cost model to illustrate the prototype;
	private final static double TIMEUNIT = 1;
	private final static long HORIZON = 18;
	private final static long HORIZONSTART = 20;
	private final static CostCalculations costCalc = new CostCalculations();
	//private final static double COSTPERTIMEUNIT = 30;
	//private final static double COSTPERRESOURCE = 50;
	//private final static double COSTPERUTILIZATION = 10;
	//private final static long HORIZON = (long) (TIMEUNIT * 2);

	public double getFitness(ConcreteEventLog candidate,	List<? extends ConcreteEventLog> population) {
		return getCost(candidate);
	}

	@Override
	public double getCost(ConcreteEventLog candidate) {
		return costCalc.calculateCost(candidate, TIMEUNIT, HORIZON, HORIZONSTART);
	}
}
